package effect;

import effect.Effect.EffectType;

public class AsraiRage extends Effect {
	
	int turnsLeft;
	
	public AsraiRage(){
		name="Asrai Rage";
		description="The unit is enraged by the Asrai Dance, increasing it's maximum damage by 1.";
		imageName="cardIconAsraiRage.png";
		effectTypes.add(EffectType.damageModifier);
		effectTypes.add(EffectType.triggerOnTurnEnd);
		turnsLeft=2;
	}
	
	@Override
	public void triggerOnTurnEnd(){
		if(turnsLeft > 1){
			turnsLeft--;
		}else{
			EffectUtil.getCard(this).getEffects().remove(this);
		}
	}
	
	@Override
	public int getAddedMaximumDamage(int baseMaximumDamage){
		return 1;
	}
	
	@Override
	public String getDescription(){
		if(turnsLeft>0)
			return "The unit is enraged by the Asrai Dance, increasing it's maximum damage by 1 for another "+turnsLeft+" turns.";
		else
			return "The unit is enraged by the Asrai Dance, increasing it's maximum damage by 1.";
	}
	
	public void setTurnsLeft(int t){
		turnsLeft=t;
	}
}
